<?php
namespace app\admin\controller;
use app\admin\common\Base;
use think\Session;
use think\Db;
class Merchant extends Base
{
    public function index ()
	{
		$merchant = Db::table('merchant')->where('status', 1)->order('id desc')->paginate(10);
		$total = count($merchant);
		$page = $merchant->render();
		$this -> view -> assign('total', $total);
		$this -> view ->assign('merchant', $merchant);
		$this -> view -> assign('page', $page);
		return $this ->fetch('merchant/list');
	}
	
	public function unauthor ()
	{
		$merchant = Db::table('merchant')->where('status', 0)->paginate(10);
		$total = count($merchant);
		$page = $merchant->render();
		$this -> view -> assign('total', $total);
		$this -> view ->assign('merchant', $merchant);
		$this -> view -> assign('page', $page);
		return $this ->fetch('merchant/del');
	}
	
	
}
